1 Introduction

Liquid chromatography–high-resolution mass spectrometry (LC-MS)-based metabolomics aims to identify and quantify all metabolites, but most LC-MS peaks remain unidentified. Here we present a global network optimization approach, NetID, to annotate untargeted LC-MS metabolomics data. The approach aims to generate, for all experimentally observed ion peaks, annotations that match the measured masses, retention times and (when available) tandem mass spectrometry fragmentation patterns. Peaks are connected based on mass differences reflecting adduction, fragmentation, isotopes, or feasible biochemical transformations. Global optimization generates a single network linking most observed ion peaks, enhances peak assignment accuracy, and produces chemically informative peak–peak relationships, including for peaks lacking tandem mass spectrometry spectra. Thus, NetID applies existing metabolomic knowledge and global optimization to substantially improve annotation coverage and accuracy in untargeted metabolomics datasets, facilitating metabolite discovery.

NetID requires: (1) data file (in .mzXML format), (2) a peak table (in .csv format), (3) a reference compound library (in .rds format), (4) a transformation table (in .csv format), for which we assembled a list of 25 biochemical atom differences and 59 abiotic atom differences. NetID optionally use (5) a list of known metabolites’ retention time, for which we provide our in-house retention time list for demonstration and (6) .mgf file containing MS2 information and (7) MS2 reference library (in .rds format). More details in section 3.1.

In the 2023 August version, we implemented the following updates:
(1) Include both orbitrap and TOF demo data;
(2) Handle data-dependent MS2 data;
(3) Incorporate FastNetID codes proposed in OmicsNet1, which uses C language to accelerate calculations in NetID;
(4) Provide a detailed peak picking workflow using MZmine32 and EVA3;
(5) Merge two compound libraries HMDB4 and PubChemLite5-6;
(6) Restructure the workflow to remove unstable functions and simplify the parameter settings.

Citation: Chen, L., Lu, W., Wang, L. et al. Metabolite discovery through global annotation of untargeted metabolomics data. Nat Methods 18, 1377–1385 (2021). https://doi.org/10.1038/s41592-021-01303-3
Git-hub: https://github.com/LiChenPU/NetID

Reference:

  1. Zhou, G., Pang, Z., Lu, Y., Ewald, J. & Xia, J. OmicsNet 2.0: A web-based platform for multi-omics integration and network visual analytics. Nucleic Acids Research gkac376 (2022).
  2. Schmid, R. et al. Integrative analysis of multimodal mass spectrometry data in MZmine 3. Nat Biotechnol 41, 447–449 (2023).
  3. Guo, J. et al. EVA: Evaluation of Metabolic Feature Fidelity Using a Deep Learning Model Trained With Over 25000 Extracted Ion Chromatograms. Anal. Chem. 93, 12181–12186 (2021).
  4. Wishart, D. S. et al. HMDB 4.0: The human metabolome database for 2018. Nucleic Acids Research 46, D608–D617 (2018).
  5. Kim, S. et al. PubChem 2019 update: Improved access to chemical data. Nucleic Acids Research 47, D1102–D1109 (2019).
  6. Bolton, E. & Schymanski, E. PubChemLite tier0 and tier1. Zenodo https://doi.org/10.5281/zenodo.3611238 (2020).

2 Environment Setup

This section provides step-by-step instructions to set up the environment to run NetID algorithm in a local computer.

2.1 Software installation

Install R, Rstudio, Rtools43, ILOG CPLEX Optimization Studio (CPLEX), Git, and ProteoWizard, preferably at default locations. You may need to add these softwares to PATH.

R (version 4.3.1 tested): https://www.r-project.org/
RStudio: https://rstudio.com/products/rstudio/download
Rtools43: https://cran.r-project.org
CPLEX (version 12.10 tested): https://www.ibm.com/academic/technology/data-science
ProteoWizard: http://www.proteowizard.org/download.html
Git: https://git-scm.com/downloads

2.2 Code download

2.2.1 Via Github

Go to website https://github.com/LiChenPU/NetID, hit the green code button, select download zip, and unzip files.

2.2.2 Via Git

In Rstudio, go to File \(\rightarrow\) New project \(\rightarrow\) Version control \(\rightarrow\) Git, enter https://github.com/LiChenPU/NetID.git for URL, select a subdirectory, and create project.

You should be able to see all files in place under your selected subdirectory. Use the pull option in Git to check for the latest updates.

In the downloaded NetID file, the dependence folder stores all reference files, the code folder stores codes needed for NetID, the data folder stores the data to be processed.

2.3 Demo data download

Demo data can be downloaded at:

  1. URL: https://drive.google.com/drive/folders/1oOpnu8dlV1Ra-fxJBX671eJaRnCJ_QNZ?usp=sharing.
  2. URL: https://pan.baidu.com/s/1wcpNOqI9M3IYHQ_xGulSKA, Password: drjr.

The download demo data is saved in the data folder. For example, replace the ./data/QTOF_6600_demo/pos/raw_data folder with the downloaded raw_data folder.

2.4 Package dependency installation

2.4.1 Install common packages

  1. Open the R script NetID_packages.R in get started folder.
  2. Run all lines.

2.4.2 Install cplexAPI

  1. Go to website https://cran.r-project.org/src/contrib/Archive/cplexAPI/, look for Package source, and download cplexAPI_1.4.0.tar.gz.

  2. The package, cplexAPI, requires additional installation steps.

  3. Unzip the folder cplexAPI to the desktop,open subfolder src,modify the file Makevars.win.

    • Replace \ in the Makevars.win file into / in order for R to recognize the path. -I"${CPLEX_STUDIO_DIR}\cplex\include" should be replaced with path such as:
      -I"C:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/include"

    • The -L"${CPLEX_STUDIO_LIB}" should be replaced with path such as -L"C:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/bin/x64_win64"

  4. In command line, run line below to build package, change ${Username} to actual name. R CMD build --no-build-vignettes --no-manual --md5 "C:\Users\${Username}\Desktop\cplexAPI"

  5. In command line, run line below to install package.
    R CMD INSTALL --build --no-multiarch .\cplexAPI_1.4.0.tar.gz

  6. If you see DONE (cplexAPI), then the package installation is successful.

    • Note: if error occurs relating to __declspec(dllimport deprecated), you need to go to C:\Program Files\IBM\ILOG\CPLEX_Studio1210\cplex\include\ilcplex (or your own installation folder), open the file cpxconst.h, go to the line indicated in the error message or search for __declspec(dllimport deprecated), add _ in between, make it to __declspec(dllimport_deprecated). Save file and repeat step 4.

3 Using NetID

3.1 Data requirment

3.1.1 MS data

The MS data should be placed in the raw_data folder of the analyzed folder (such as ./data/QTOF_6600_demo/neg/raw_data) as mzXML files. mzXML is a file format commonly used for storing mass spectrometry data, particularly from LC-MS experiments. mzXML format contains information about mass spectra, including the m/z (mass-to-charge ratio) values, ion intensities, retention times associated with the experiment.

Convert raw data to mzXML
Use software ProteoWizard to convert LC-MS data files (.raw or .wiff) into mzXML format.

  • Click the Browse button to select files you want to process, then click the add button.

  • Click Output format button to select the file format to be generated.

  • Within the filter option, select Peak Picking, then set MS level to 1-2, and click the add button.

  • Click the start button.

3.1.2 Peak table

The peak table should be placed in the specific analyzed folder (such as ./data/QTOF_6600_demo/neg) as a csv file. It records peak information, such as id, mz, rt, rtmin, rtmax, , and mean_inten.

read.csv("../NetID/get started/UserGuideMD/peak_table.csv")[1:3,]
##     id      mz    rt rtmin rtmax n_293T_2 mean_inten
## 1 1531 71.0140  9.49  9.05  9.62    12000      12000
## 2 2426 71.0141 11.66 11.54 11.79     1800       1800
## 3 1664 72.0091  9.80  9.73  9.87     1200       1200

You can use any software to obtain your own peak table, as long as it is converted to the format above. If rtmin and rtmax is not known, use rt ± a certain fixed number (e.g. ± 0.5). Note that all isotopes, adducts, fragments should not be removed in the peak table as they are important information for NetID global optimization.
We provide our workflow for obtaining the peak table in section 5.

3.1.3 MS2 data

The MS2 data files should be placed in the raw_data folder of the analyzed folder (such as ./data/QTOF_6600_demo/neg/raw_data/MS2_Data) as mgf files. A data-dependent acquisition file is used to obtain the mgf file using ProteoWizard.
Click the Output format button and select mgf format.

3.1.4 Reference compound library

The compound library exists in the dependence folder as a rds file. It records the compound information, such as accession, name, SMILES, status, formula, mass, rdbe, etc. The information is extracted from and merged with two compound libraries: HMDB and PubChemLite.

readRDS("../NetID/dependence/hmdb_pubchemlite_merge_result_simple.rds")[1:3, -c(9,10)]
##     accession               name                      SMILES   formula     mass
## 1 HMDB0000001  1-Methylhistidine CN1C=NC(C[C@H](N)C(O)=O)=C1 C7H11N3O2 169.0851
## 2 HMDB0000002 1,3-Diaminopropane                       NCCCN   C3H10N2  74.0844
## 3 HMDB0000005 2-Ketobutyric acid               CCC(=O)C(O)=O    C4H6O3 102.0317
##   rdbe PubMed_Count     status     FirstBlock   category
## 1    4           94 quantified BRMWTNUJHUMWMS Metabolite
## 2    0          575 quantified XFNJVJPLKCPIBV Metabolite
## 3    2          328 quantified TYEYBOSBBBHJIV Metabolite

3.1.5 Known library

The known library exists in the dependence folder as a csv file. It records the retention time information of metabolites. We provide our in-house RT table for demo.

readRDS("../NetID/get started/UserGuideMD/RT_library.rds")
##     accession                  name                                   SMILES
## 1 HMDB0000001     1-Methylhistidine              CN1C=NC(C[C@H](N)C(O)=O)=C1
## 2 HMDB0000005    2-Ketobutyric acid                            CCC(=O)C(O)=O
## 3 HMDB0000008 2-Hydroxybutyric acid                         CC[C@H](O)C(O)=O
## 4 HMDB0000011 3-Hydroxybutyric acid                        C[C@@H](O)CC(O)=O
## 5 HMDB0000012          Deoxyuridine OC[C@H]1O[C@H](C[C@@H]1O)N1C=CC(=O)NC1=O
##     formula     mass rdbe     status Hilicon
## 1 C7H11N3O2 169.0851    4 quantified   8.658
## 2    C4H6O3 102.0317    2 quantified   4.159
## 3    C4H8O3 104.0473    1 quantified   5.698
## 4    C4H8O3 104.0473    1 quantified   7.336
## 5 C9H12N2O5 228.0746    5 quantified   3.596

3.1.6 MS2 spectral library

The MS2 spectral library exists in the dependence folder as a rds file. It records the reference MS2 spectra. We download MS2 data from HMDB and convert it into the format we defined.

readRDS("../NetID/get started/UserGuideMD/MS2_library.rds")[1]
## [[1]]
## [[1]]$spectrum
##         mz intensity formula
## 1 101.0244         1  C4H6O3
## 
## [[1]]$notes
## character(0)
## 
## [[1]]$formula
## [1] "C4H6O3"
## 
## [[1]]$external_id
## [1] "HMDB0000005"
## 
## [[1]]$SMILES
## [1] "CCC(=O)C(O)=O"
## 
## [[1]]$precursor_mz
## [1] 101.0244
## 
## [[1]]$polarity
## [1] "negative"
## 
## [[1]]$instrument_type
## [1] "LC-ESI-QTOF (UPLC Q-Tof Premier, Waters)"
## 
## [[1]]$collision_energy_level
## character(0)
## 
## [[1]]$collision_energy_voltage
## character(0)
## 
## [[1]]$adduct
## [1] "M-H"
## 
## [[1]]$data_source
## [1] "Experimental spectra from HMDB"

3.1.7 Transformation table

The transformation table exists in the dependence folder empirical_rules.csv. It records the connection types (or edges) used in NetID, such as CH2 as a biotransformation connection, or Na-H as an adduct connection.

read.csv("../NetID/dependence/empirical_rules.csv")[c(1,27,43,86,88),]
##             category  name   formula       mass direction rdbe        note
## 1       Biotransform  O-HN  O1N-1H-1  0.9840156         0  0.0 Deamination
## 27 Natural_abundance [15]N [15]N1N-1  0.9970350         1  0.0            
## 43            Adduct  Na-H    H-1Na1 21.9819446         1  0.0            
## 86          Fragment   H2O      H2O1 18.0105647        -1 -1.0            
## 88           Radical     H        H1  1.0078250        -1 -0.5

3.2 Input in NetID

Check if all files mentioned above are ready for running NetID.

  1. Open code folder \(\rightarrow\) NetID_run_script.R.

  2. Key parameter settings

  • analyzed_folder: set the peak table file directory. ``` analyzed_folder = “QTOF_6600_demo” setwd(paste(main_data_dir, analyzed_folder, sep = .Platform$file.sep)) analyzed_dir = getwd()

    ```

  • LC_method: set the experimental LC methods. LC_method = "Hilicon_6600"

  • sample filter: set the Quality Control methods. sample_filter = "293T"

  • ion mode: set ion_mode as -1 if negative ionization data is loaded, and 1 if positive ionization data loaded. mode = -1

  • ms2_option: set as T if MS2 is available for this dataset, else ms2_option set F. ms2_option = T

  • manual_library_option: set as F if manual_library_option is empty,else manual_library_option set T. manual_library_option = T

  • Ctype: set the optimization type. C: continuous linear programming - fast & reasonably accurate; B: integer(binary) linear programming - slow & slightly better. Ctype = "C"

  • MS_type: set the MS instrument types, commonly used QTOF and Orbitrap. If instrument_parameter_type is set as default. The program will use default settings. Set the instrument_parameter_type to Custom and edit the instrument_parameter_custom if customized parameters are desired.

       MS_type = 'QTOF' # QTOF, Orbitrap
       instrument_parameter_type = "Default"  # Custom
       instrument_parameter_custom = data.frame(ppm = 10e-6,
                                                ms1_ms2_match_ppm = 20e-6,
                                                propagation_ppm = 10e-6,
                                                record_ppm = 10e-6,
                                                edge_expand_inten_cutoff = 1e3,
                                                score_mz_ppm_error_rate = -0.125)

3.3 Main steps and successful result

3.3.1 Set NodeSet and EdgeSet

Setting up NodeSet and EdgeSet...
[1] "3453 negative nodes"
           Adduct      Biotransform          Fragment Natural_abundance           Radical 
             6572              8274               661              8617               591 

3.3.2 EdgeSet_expand

Setting up LibrarySet and StructureSet...
start EdgeSet_expand...
[1] "oligomer_multicharge 278"
[1] "experiment_MS2_fragment 4849"
[1] "library_MS2_fragment 7"
Candidate formula pool propagation and scoring...
[1] "Step 1 elapsed="
Time difference of 5.939358 secs
[1] "Step 2 elapsed="
Time difference of 15.9693 secs
[1] "Step 0.01 elapsed="
Time difference of 27.72133 secs
[1] "Step 0.02 elapsed="
Time difference of 42.09879 secs
[1] "Step 0.03 elapsed="
Time difference of 1.11554 mins
[1] "Step 1.01 elapsed="
Time difference of 1.398908 mins
[1] "Step 1.02 elapsed="
Time difference of 1.706977 mins
[1] "Step 1.03 elapsed="
Time difference of 2.239343 mins

3.3.3 CplexSet and ilp_nodes and ilp_edge

setting up CplexSet...
[1] "Finish CplexSet initialization"
[1] "Finish CplexSet scoring"
[1] "Complexity is 264379 variables and 368739 constraints."
     nc      nr CPX_MAX     obj     rhs   sense     beg     cnt     ind     val      lb      ub   ctype 
      1       1       1  264379  368739  368739  264379  264379  836463  836463  264379  264379  264379 
    mat 
      6 

3.3.4 Run optimization.

In the console, error message should not occur. If optimization step is successful, you will see messages in the following format.

Run optimization...
[1] "Optimization ended successfull - optimal  - OBJ_value = 1989.44"
41.87 sec elapsed
path annotation...
Time difference of 7.028952 mins
NetID total run time:Time difference of 12.96994 mins

3.3.5 Output

Three files will be generated in the neg(or pos)/NetID_output folder. Expected run time on a “normal” desktop computer should be within an hour.
* NetID_annotation.csv contains the annotation information for each peak.
* cyto_nodes.csv and cyto_edges.csv record all the information about the nodes and edges that make up the molecular network. * NetID_output.RData records all variables during operation. This file will be used for network visualization in Shiny R app.

3.4 Customized settings

3.4.1 Customized known library

In the dependence folder, open the known_library.csv file. Add or remove metabolites in the known library file as you wish. For RT information, add column to record retention time. Multiple RT lists can be stored by adding additional columns. Empty retention time is allowed for a entry.

In NetID_run_script.R, set LC_method to the column name to input RT information in NetID.

3.4.2 Customized MS2 spectral library

A limited number of MS2 spectra are included in the demo. You can adapt your own MS2 library to the existing format.

3.4.3 Customized transformation table

emperical_rules.csv can also be created or modifed to support specific biotransformation. A workable emperical_rules requires following columns. * name and note is not necessary. * category includes: Biotransform, Natural_abundance, Adduct, Fragment and Radical * rbde is calculated using the formula_rbde function of the package lc8 * direction states the possible direction of transformation: 1 means from larger mass to smaller mass; 0 means the opposite; -1 means both direction are possible.

3.4.4 Score Setting

See Supplementary Note 2 of NetID paper for explanation

4 NetID Visualization

This section provides instruction to visualize and explore NetID output results in either Cytoscape software or interactive Shiny R app. After running NetID algorithm, it will export one .R and two .csvfiles (cyto_node.csv and cyto_edges.csv), storing the nodes and edges of the output network.

4.1 Shiny App

This part provides instruction to visualize and explore NetID output results in the interactive Shiny R app. A 21-inch or larger screen is recommended for best visualization.

4.1.1 Runing Shiny App

  1. Open code folder \(\rightarrow\) R_shiny_App.R.

  2. In the # Read in files #### section, set datapath as ../NetID/data/QTOF_6600_demo/neg/

  3. Keep all other parameters as default, and run all lines.

  4. A Shiny app will pop up.

4.1.2 Searching peaks of interest

  1. On the left panel, you can enter a m/z or a formula to search your peak of interest. For example, 678.4405 or C35H67O10P1 will automatically update the data table on the right. Enter 0 to restore full list for the data table.

  2. Change ionization and ppm window to adjust calculated m/z.

  3. On the right, you can explore the peak list in an interactive data table, including global text search on top right, specifying ranges for numeric column or searching text within character columns, ranking each column etc.

4.1.3 Network Visualization

  1. Peak ID, formula and class determines the center node for the network graph. Peak ID will be automatically updated by the first line in the data table if a m/z or formula is given. Alternatively, you can manually enter Peak ID.

  2. The degree parameter controls how far the network expands from the center node. Degree 1 means only nodes directly connected to the center node will be shown and degree 2 means nodes connected to degree 1 will be shown, etc.

  3. Biochemical graph shows biochemical connections. Abiotic graph shows abiotic connections. Node labels and Edge labels determines if the graph show node or edge labels. Optimized only determines whether to show only the optimal annotations or all possible annotations in the network.

  4. When setting parameters, hit plot to see the network graph.

  1. A sample network graph is shown below (a different center node may give less complicated graph). You may edit the nodes or edges (top left), move figures with the arrow buttons (bottom left), and zoom in/out or center figure (bottom right).

  1. You can use the “Download plot” button to download a html webpage to visualize the network graph independent of the Shiny app, and the “Download csv” button to download the information of the nodes in the network. The download buttons will appear after hitting the plot button. Note: edits within the Shiny app will not go into the html file.

4.1.4 Possible structures exploration

A figure + data table is provided to explore structures of the selected node in the network graph.

  1. The figure shows the chemical structure of the annotated metabolites. If the node is annotated as a putative metabolite, only the known parts of the putative metabolite will be shown.
    Scroll left or right, or select the entry number, to visualize different annotations. Right click and select to save image.

  2. In the data table, class has 3 possible entries: Metabolite if it is documented in database such as HMDB library; Putative metabolite if it is transformed from a metabolite through a biotransformation edge; and Artifact if it is transformed by an abiotic edge.
    Use the download button to download the data table

4.2 Cytoscape

  1. install Cytoscape (https://cytoscape.org/what_is_cytoscape.html) Download Cytoscape (https://cytoscape.org/download.html) and follow installation instruction to install onto your computer.

  2. Load the example NetID output into Cytoscape

    • Run Cytoscape, click import network from file system, and load cyto_edges.csv, set edge_id column as the key.
    • Click import table from file, load cyto_node.csv, set node_id column as the key, and the rest columns as node attribute.
    • Select subnetwork, set styles, and explore the network with various functionalities inside Cytoscape.
  3. Explore in Cytoscape
    http://manual.cytoscape.org/en/stable/index.html provides all you need to know about exploring in Cytoscape.

  4. Export
    The network as well as the curated subnetworks can be exported for future analysis or sharing with others.

5 Peak picking workflow

NetID is an untargeted metabolomics annotation algorithm. There are many existing software/workflows for peak picking and most metabolomics labs/facilities have their own preference.
We provide a workflow that works resonably well in our lab. We use data in ./data/QTOF_6600_demo/neg/raw_data for demo. You may compare different workflows and pick your own.

5.1 Peak picking with mzmine3

MZmine3: https://github.com/mzmine/mzmine3/releases/

Open MZmine3 \(\rightarrow\) processing wizard \(\rightarrow\) LC-MS/LC-IMS-MS workflow Ctrl+W \(\rightarrow\) Build batch.
Import wizard.xmland mzXML files, generate mzmine.csv files and save it in ../data/QTOF_6600_demo/neg/raw_data/mzmine.csv folder.

Note:

  1. wiff format conversion requires both .wiff and .wiff.scan files in the same folder.

  2. The input mzXML file needs to be stored separately for negative and positive mode data. If the raw data or the mzXML file contains both negative and positive data, you can use ProteoWizard MSConvert to separate them. In the filter option, select Subset, choosing Scan polarity (positive or negative) and clicking add.

5.2 Peak filtering with EVA and in-house R workflow

This section uses EVA and in-house R workflow and the mzmine.csv from the previous step to filter out less satisfactory peaks to obtain the NetID input file peak_table.csv.

EVA: Download from the Windows Store and set up accordingly. We download R-4.0.4 and python37, open EVA and click on Settings \(\rightarrow\) find python.exe and Rscript.exe in the folder and set them as paths \(\rightarrow\), and save.

  1. Prepare a sample_info.csv as demonstrated in the folder.
read.csv("../NetID/get started/UserGuideMD/sample_info.csv")[1,]
##   Cohort  Samples
## 1 n_293T n_293T_2
  1. Open ./code/untargetd_peaktable.R, set common parameters.
    Also set EVA original directory in code.
     eva_original_dir ="C:/Users/{YOUR_USER_NAME}/AppData/Local/Packages/11888HuanLab.EVAanalysistool_8tmgtde19meca/LocalState"
  1. Run the first four parts of the untargetd_peaktable.R (including Library, Parameter setup, Function and Read files) to obtain eva_input_format.csv in eva_output folder

  2. Run EVA - Open EVA \(\rightarrow\) import mzXML file \(\rightarrow\) import eva_output_format.csv \(\rightarrow\) Feature Evaluation Model choosing Deault \(\rightarrow\) Run

  3. Run the remaining code in untargetd_peaktable.R and generate peak_table.csv.

read.csv("../NetID/get started/UserGuideMD/peak_table.csv")[1:3,]
##     id      mz    rt rtmin rtmax n_293T_2 mean_inten
## 1 1531 71.0140  9.49  9.05  9.62    12000      12000
## 2 2426 71.0141 11.66 11.54 11.79     1800       1800
## 3 1664 72.0091  9.80  9.73  9.87     1200       1200

6 Troubleshooting

6.1 Failing to install package lc8

Reinstall the packages devtools and digest.

6.2 Cannot find cplexAPI even if the installation seems successful

Check R version used in RStudio to see if cplexAPI is installed under the same R version library. Which R library cplexAPI goes to depends on the R path specified in Environment Variables.

6.3 Add softwares to PATH

Go to Environment Variables:
search PATH in windows \(\rightarrow\) open edit Environment Variables \(\rightarrow\) Environment Variables or
control panel \(\rightarrow\) system and security \(\rightarrow\) System \(\rightarrow\) Advanced system Settings (on your left) \(\rightarrow\) Advanced \(\rightarrow\) Environment Variables

  • Add R C:\R-4.3.0\bin to the path variable in the environment variables.

  • Add Rtools43 C:\Rtools43\mingw64\bin;C:\Rtools43\usr\bin;C:\Rtools43 to the path variable in the environment variables.

  • Add java C:\java\bin to the path variable in the environment variables.

  • Adding Git C:\Git\cmd to the path variable in the environment variables.